import java.util.Scanner;
//会发生超时
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int x = in.nextInt();
        int[] arr = new int[n+1];
        for(int i = 1; i <= n; i++){
            arr[i] = in.nextInt();
        }
        int left = 1, right = 1;
        int retleft = -1, retright = -1;
        int retlen = n;
        int sum = 0;
        while(right <= n){
            sum += arr[right];
            while(sum >= x){
                if((right - left +1)< retlen){
                    retleft = left;
                    retright = right;
                    retlen = right - left + 1;
                }
                sum -= arr[left];
                left++;
            }
            right++;
        }
        System.out.print(retleft + " " + retright);
    }
}